/** @file State
    @class State
    @brief The abstract parent class for the MainMenuState and GameState
*/

#include "stdafx.h"

#include "Controller.h"
#include "Model.h"

#ifndef __State_h_
#define __State_h_

/**
* A state contains a model and controllers to modify that state
*/
class State {
public:
	/**
	* @brief Constructor
	*
	*/
	State();
	/**
	* @brief Destructor
	*
	*/
	~State();
	/**
	* @brief Update the state, the model, and all controllers
	*
	*/
	virtual bool update(float deltaTime);
	/**
	* @brief Add a controller to the state
	*
	*/
	void addController(Controller *controller);
	/**
	* @brief Remove a controller to the state
	*
	*/
	void removeController(Controller *controller);
	/**
	* @brief Set the model for the state
	*
	*/
	void setModel(Model* model);
	/**
	* @brief Get the model of the state
	*
	*/
	Model* getModel();
	/**
	* @brief Initialize all Controllers of the state
	*
	*/
	void initializeControllers();

protected:
	Model* m_currentModel;
	/**
	* @brief List of all the controllers
	*
	* These controllers are attached to the state during initialization so that all controllers are updated in the update method
	*/
	std::list<Controller*>* m_controllers;

private:
	
	

};


#endif //__State_h_